<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPageMcSig.master"
    CodeFile="SigAccionMetas.aspx.cs" Inherits="SigAccionMetas" %>

<%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %>
<%@ Register assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dxwgv" %>    
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register Assembly="DevExpress.Web.v12.2, Version=12.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script language="javascript" type="text/javascript">
    function confirmEdit()
    {
    var counter = ctl00_ContentPlaceHolder1_gidvAccionMetaDEvExpress.GetSelectedRowCount();
    if (counter > 1)
        {
        counter = 0;
            alert("Debe seleccionar un solo registro");
            return(false);
        }
        else if (counter == 1)
        {
        counter = 0;
            return(true);
        }
        else if (counter == 0)
        {
        counter = 0;
        alert("Debe seleccionar al  menos un registro");
            return(false);
        }
    }
	function actualizarTotales()
	{
	  Anthem_InvokePageMethod(
            'CargarTotales',
            [],
            function(result) {}
        );	    
	}
    </script>
    <h1 class="presupuesto">Ejecucion Presupuestal</h1>
    
<div class="borde">
                <table width="100%" border="0" class="content-box">
                    <tr>
                        <td colspan="2" class="box-header"><h2><asp:Label ID="lblDependencia" runat="server"></asp:Label></h2>
                            </td></tr>                        
                                <tr>
                                    <td class="campo">
                                        Rubro</td>
                                    <td>
                                        <asp:LinkButton ID="lblDescripcionRubro" runat="server" CausesValidation="False"
                                            OnClick="lblDescripcionRubro_Click"></asp:LinkButton></td>
                                </tr>
                                <tr>
                                    <td class="campo">Codigo Presupuestal</td>
                                    <td>
                                        <asp:Label ID="lblCodigoPresupuestal" runat="server"></asp:Label></td>
                                </tr>
                                <tr>
                                    <td class="campo">Valor apropiacion</td>
                                    <td>
                                        <asp:Label ID="lblValorApropiacion" runat="server"></asp:Label></td>
                                </tr>
                                <tr>
                                    <td class="campo">Actividad</td>
                                    <td><asp:LinkButton ID="lblAccion" runat="server" CausesValidation="False" OnClick="lblAccion_Click"></asp:LinkButton></td>
                                </tr>
                                <tr>
                                    <td class="campo">Valor</td>
                                    <td><asp:Label ID="lblValorAccion" runat="server"></asp:Label></td>
                                </tr>
                                </table>
                                </div>
                               
                    <table class="tabs" cellpadding=0 cellspacing=0>                                        
                    <tr>
                        <td style="height: 20px">
                            <asp:ImageButton ID="btnRegresar" runat="server" CausesValidation="False" ImageUrl="~/Imagenes/bt-regresar.gif"
                                OnClick="btnRegresar_Click" /></td>
                        <td class="tab-activo" style="height: 20px">
                            <anthem:LinkButton ID="lnkAccionesMetas" runat="server" CausesValidation="False"
                                EnableCallBack="False" OnClick="lnkAccionesMetas_Click" OnClientClick="return confirmEdit();">Metas</anthem:LinkButton>
                        </td>
                        <td class="tab-inactivo" style="height: 20px"> 
                            <anthem:LinkButton ID="LinkEpes" runat="server" CausesValidation="False" EnableCallBack="False"
                                OnClick="LinkEpes_Click" >EPEs</anthem:LinkButton></td>
                        <td class="tab-inactivo" runat="server" id="ww" visible="true" style="height: 20px">
                            <anthem:LinkButton ID="LinkContratos" runat="server" CausesValidation="False" EnableCallBack="False"
                                OnClick="LinkContratos_Click" OnClientClick="return confirmEdit();">Avances Metas</anthem:LinkButton></td>
                    </tr>
                </table><div class="overflow">
                <dxwgv:ASPxGridView ID="gidvAccionMetaDEvExpress" runat="server" AutoGenerateColumns="False"
                    CssFilePath="~/App_Themes/Plastic Blue/{0}/styles.css" CssPostfix="PlasticBlue"
                    KeyFieldName="MET_ID" Width="100%">
                    <SettingsPager ShowDefaultImages="False" AlwaysShowPager="True">
                        <AllButton Text="Todos" Visible="True">
                        </AllButton>
                        <NextPageButton Text="Siguiente &gt;">
                        </NextPageButton>
                        <PrevPageButton Text="&lt; Anterior">
                        </PrevPageButton>
                    </SettingsPager>
                    <Images ImageFolder="~/App_Themes/Plastic Blue/{0}/">
                        <CollapsedButton Height="10px" Url="~/App_Themes/Plastic Blue/GridView/gvCollapsedButton.png"
                            Width="9px" />
                        <ExpandedButton Height="9px" Url="~/App_Themes/Plastic Blue/GridView/gvExpandedButton.png"
                            Width="9px" />
                        <HeaderSortDown Height="11px" Url="~/App_Themes/Plastic Blue/GridView/gvHeaderSortDown.png"
                            Width="11px" />
                        <HeaderSortUp Height="11px" Url="~/App_Themes/Plastic Blue/GridView/gvHeaderSortUp.png"
                            Width="11px" />
                    </Images>
                    <Styles CssFilePath="~/App_Themes/Plastic Blue/{0}/styles.css" CssPostfix="PlasticBlue">
                        <Header ImageSpacing="10px" SortingImageSpacing="10px">
                        </Header>
                    </Styles>
                    <Columns>
                            <dxwgv:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0" Width="20px">
                                <ClearFilterButton Visible="True">
                                </ClearFilterButton>
                            </dxwgv:GridViewCommandColumn>
                            <dxwgv:GridViewDataTextColumn FieldName="MET_ID" Visible="False" VisibleIndex="1">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn FieldName="ACC_ID" Visible="False" VisibleIndex="1">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Nombre" FieldName="MET_NOMBRE" VisibleIndex="1"
                                Width="300px">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Unidad de Medida" FieldName="MET_UNIDAD_MEDIDA"
                                VisibleIndex="2" Width="100px">
                                <HeaderStyle Wrap="True" />
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Cantidad Programada" FieldName="MET_CANTIDAD" VisibleIndex="3"
                                Width="100px">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Cantidad Avances" FieldName="SIG_CANTIDAD_AVANCE"
                                VisibleIndex="4">
                            </dxwgv:GridViewDataTextColumn>
                            <dxwgv:GridViewDataTextColumn Caption="Porcentaje Avance" FieldName="PORCENTAJE"
                                VisibleIndex="5">
                                <PropertiesTextEdit DisplayFormatString="{0:N2}">
                                </PropertiesTextEdit>
                            </dxwgv:GridViewDataTextColumn>
                        </Columns>
                        <TotalSummary>
                        <dxwgv:ASPxSummaryItem DisplayFormat="{0:N0}" FieldName="MET_CANTIDAD" ShowInColumn="MET_CANTIDAD"
                            SummaryType="Sum" />
                    </TotalSummary>
                    <SettingsBehavior ColumnResizeMode="Control" />
                </dxwgv:ASPxGridView>
                </div>
</asp:Content>
